package com.wmm.fast.main.shop2State;

/**
 * @Auther: wangzun
 * @Date: 2018/9/13 16:34
 * @Description: 状态模式执行
 * 将于特定状态相关的行为局部化,将不同状态的行为抽离.
 */
public class StateExecutor {
    public static void main(String[] args) {
        Context context = new Context(new ConcreteStateA());
        context.setCount(1);
        context.request();
        context.setCount(2);
        context.request();
        context.setCount(1);
        context.request();
        context.setCount(1);
        context.request();
        context.setCount(1);
        context.request();
    }
}
